import java.util.Collection;
import java.util.Iterator;
import java.util.Queue;
import java.util.Scanner;

public class three {
    public static void main(String[] args) {
        int[] arr = new int[110];
        Scanner scanner = new Scanner(System.in);

        for (int i = 1;i <= 100;i ++ ) arr[i] = i;
        int num = scanner.nextInt();
        int k = scanner.nextInt();
        int m = scanner.nextInt();
        int t = num, cnt = 0; // 2 5

        while (t > 1) {
            while (arr[k] == 0) {
                k++;
                if (k > num) k = 1;
            }
            cnt++;
            if (cnt == m) {
                t--;
                arr[k] = 0;
                cnt = 0;
            }
            k++;
            if (k > num) k = 1;
        }
        for (int i = 1;i <= num;i ++ ) {
            if (arr[i] != 0) {
                System.out.println(arr[i]);
            }

        }
    }
}
